
import javax.swing.text.Utilities;


/**
 *
 * @author FelipeJ
 */
public class test {
    
    public static void main(String[] args) {
        
        
 
        
        String sss=",b,b,";
        
        String[] sssarray=sss.split(",",-1);
        
        for (String lolo: sssarray){
            System.out.println(lolo+"2");
        } 
                
        
        
        
        
   
        
    }
    
        //replaces a substring in a string 
    public static String replace(String str, String pattern, String replace) {
        int s = 0;
        int e = 0;
        StringBuffer result = new StringBuffer();

        while ((e = str.indexOf(pattern, s)) >= 0) {
            result.append(str.substring(s, e));
            result.append(replace);
            s = e + pattern.length();
        }
        result.append(str.substring(s));
        return result.toString();
}
    
    

    
}
